# coding: utf-8
from . import db, BaseModel


class SysAdmin(db.Model):
    __tablename__ = 'sys_admin'

    auto_id = db.Column(db.BigInteger, primary_key=True, info='自增id')
    user_id = db.Column(db.String(20, 'utf8mb4_general_ci'), nullable=False, info='用户ID')
    account = db.Column(db.String(255, 'utf8mb4_general_ci'), nullable=False, info='账号')
    password = db.Column(db.String(500, 'utf8mb4_general_ci'), nullable=False, info='密码')
    name = db.Column(db.String(50, 'utf8mb3_general_ci'), nullable=False, info='姓名')
    gender = db.Column(db.Integer, info='性别: 1-男 ; 2-女')
    mobile = db.Column(db.String(30, 'utf8mb3_general_ci'), info='手机号')
    email = db.Column(db.String(100, 'utf8mb3_general_ci'), info='邮箱')
    is_delete = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue(), info='逻辑删除')
    create_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue(), info='创建时间')
    update_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue(), info='更新时间')
